<script src="/Tp5/public/static/admin/js/skins.min.js"></script>
<!--Basic Scripts-->
<script src="/Tp5/public/static/admin/js/jquery.min.js"></script>
<script src="/Tp5/public/static/admin/js/bootstrap.min.js"></script>
<script src="/Tp5/public/static/admin/js/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/Tp5/public/static/lib/layer/layer.js"></script>
<script src="/Tp5/public/static/layui/layui.js"></script>
<!--Beyond Scripts-->
<script src="/Tp5/public/static/admin/js/beyond.js"></script>
<script>
    $(window).bind("load", function () {

        /*Sets Themed Colors Based on Themes*/
        themeprimary = getThemeColorFromCss('themeprimary');
        themesecondary = getThemeColorFromCss('themesecondary');
        themethirdcolor = getThemeColorFromCss('themethirdcolor');
        themefourthcolor = getThemeColorFromCss('themefourthcolor');
        themefifthcolor = getThemeColorFromCss('themefifthcolor');

    });

    //退出登录
    $(function () {
        $('#loginout').click(function () {
            $.ajax({
               url:"{:url('admin/home/loginout')}",
               type:'post',
                dataType:'json',
                success:function (data) {
                   if (data.code == 1){
                       layer.msg(data.msg,{
                          icon:6,
                          time:1200
                       },function () {
                           location.href = data.url;
                       });
                   }else {
                       layer.open({
                           title:'退出失败',
                           content:data.msg,
                           icon:5,
                           anim:6
                       });
                   }
                }
            });
            return false;
        });
    });
</script>